GBML manual / Backgrounds

actor_angle

Turns the Background Actor about its anchor. Counter-clockwise, like every angle here: 90 turns it a quarter turn to the left.

Game Boy: not available

Game Boy Color: not available

Sega Genesis: not available

On other consoles this differs: see Side by side and How the consoles differ.

Syntax

actor_angle(degrees)

Arguments

NameType
degreesreal

Returns

Nothing.

Description

Turns the Background Actor about its anchor. The angle is counter-clockwise, like every angle in GBML: 90 is a quarter turn to the left. It does nothing in a room that has no zoomable background.

Any number works (360 is straight again). The call sets the angle, it does not add to it: keep the angle in a variable and set it each frame to keep it turning.

Example

// Step event of the boss: she rocks 20 degrees either way.
actor_angle(20 * angle_sin(frame_count * 4));

The picture swings 20 degrees to the left, back through straight, 20 degrees to the right, and so on.

On the GBA

A no-op in a room that has no zoomable background (set the room's Zoomable background to an actor picture). Any number works (360 is straight again). The call sets the angle, it does not add to it: keep the angle in a variable and set it each frame to keep it turning.

See also: Background actorsactor_scaleactor_anchoractor_placeangle